********* Window1 **********
var win = Titanium.UI.currentWindow;
win.backgroundColor = '#13386c';
win.barColor = '#13386c';

//
//  Champ 1
//
var message = Titanium.UI.createLabel({
    color: '#fff',
    text: 'Indiquez votre message ci-dessous:',
    top: 10,
    left: 30,
    width: 250,
    height: 'auto'
});

win.add(message);

var ta1 = Titanium.UI.createTextArea({
    value: 'Votre texte ici',
    height: 100,
    left: 30,
    width: 270,
    top: 35,
    font: { fontSize: 12, fontFamily: 'Marker Felt', fontWeight: 'bold' },
    color: '#888',
    textAlign: 'left',
    appearance: Titanium.UI.KEYBOARD_APPEARANCE_ALERT,
    keyboardType: Titanium.UI.KEYBOARD_DEFAULT,
    returnKeyType: Titanium.UI.RETURNKEY_EMERGENCY_CALL,
    borderWidth: 2,
    borderColor: '#bbb',
    borderRadius: 5,
    suppressReturn: false

});
win.add(ta1);

var save = Titanium.UI.createButton({
    title: 'Envoyer les informations',
    top: 150,
    left: 30,
    height: 30,
    width: 250
});

save.addEventListener('click', function () {
    var newWindow = Ti.UI.createWindow({ url: "Window2.js"
    });
    newWindow.MessageText = ta1.value;
    newWindow.open();
});


win.add(save);



********* Window2 **********
var win = Titanium.UI.currentWindow;
win.backgroundColor = '#13386c';
win.barColor = '#13386c';

var message = Titanium.UI.createLabel({
    color: '#fff',
    text: 'Mon message est:',
    top: 10,
    left: 30,
    width: 150,
    height: 'auto'
});

win.add(message);
var messageRecu = Titanium.UI.createLabel({
    color: '#fff',
    text: win.MessageText,
    top: 30,
    left: 30,
    width: 150,
    height: 'auto'
});
win.add(messageRecu);
